You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
797 B
26 lines
797 B
import "../globals.css";
|
|
import React from "react";
|
|
import { MainNav } from "../../components/MainNav";
|
|
import { Footer } from "../../components/Footer";
|
|
import { getMainNav } from "../../lib/data";
|
|
|
|
export const dynamicParams = true;
|
|
|
|
export async function generateStaticParams() {
|
|
return [{ locale: "zh-CN" }, { locale: "en" }];
|
|
}
|
|
|
|
export default function RootLocaleLayout({ children, params }: { children: React.ReactNode; params: { locale: string } }) {
|
|
const mainnav = getMainNav(params.locale);
|
|
return (
|
|
<html lang={params.locale}>
|
|
<body className="bg-gray-50 text-gray-900">
|
|
<MainNav items={mainnav} basePath={`/${params.locale}`} locale={params.locale} />
|
|
<main>{children}</main>
|
|
<Footer locale={params.locale} />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|
|
|
|
|
|
|